#ifndef __CORE_OPENCL_DEVICE_H__
#define __CORE_OPENCL_DEVICE_H__

#ifdef USE_OPENCL

#include "core/device.h"

namespace cl_core
{

class OpenCLDevice: public Device
{

public:
    OpenCLDevice() {}
    OpenCLDevice(const size_t id): Device(id, DEVICE_TYPE_OPENCL) {}
    ~OpenCLDevice() {}

    static Status FastAlloc(cl_mem* data, size_t bytes)
    {
        *data = clCreateBuffer(cl_core::OpenCLContext::GetInstance().GetContext(), CL_MEM_READ_WRITE, bytes, NULL, NULL);
        if (*data == NULL)
            return LLM_ERROR;
        return LLM_SUCCESS;
    }
}; // class OpenCLDevice

} // namespace cl_core

#endif // USE_OPENCL

#endif // __CORE_OPENCL_DEVICE_H__